Optimal. Leaf size=30 \[ \frac {(a+b) \tanh (c+d x)}{d}-\frac {b \tanh ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.43, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4046, 3767, 8} \[ \frac {(3 a+2 b) \tanh (c+d x)}{3 d}+\frac {b \tanh (c+d x) \text {sech}^2(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 4046
Rubi steps
\begin {align*} \int \text {sech}^2(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx &=\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac {1}{3} (3 a+2 b) \int \text {sech}^2(c+d x) \, dx\\ &=\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac {(i (3 a+2 b)) \operatorname {Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 d}\\ &=\frac {(3 a+2 b) \tanh (c+d x)}{3 d}+\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 39, normalized size = 1.30 \[ \frac {a \tanh (c+d x)}{d}-\frac {b \tanh ^3(c+d x)}{3 d}+\frac {b \tanh (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.38, size = 158, normalized size = 5.27 \[ -\frac {4 \, {\left ({\left (3 \, a + b\right )} \cosh \left (d x + c\right )^{2} - 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (3 \, a + b\right )} \sinh \left (d x + c\right )^{2} + 3 \, a + 3 \, b\right )}}{3 \, {\left (d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} + 2 \, d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 3 \, d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.12, size = 61, normalized size = 2.03 \[ -\frac {2 \, {\left (3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a + 2 \, b\right )}}{3 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 34, normalized size = 1.13 \[ \frac {a \tanh \left (d x +c \right )+b \left (\frac {2}{3}+\frac {\mathrm {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.32, size = 112, normalized size = 3.73 \[ \frac {4}{3} \, b {\left (\frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac {1}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac {2 \, a}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.38, size = 61, normalized size = 2.03 \[ -\frac {2\,\left (3\,a+2\,b+6\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,a\,{\mathrm {e}}^{4\,c+4\,d\,x}+6\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{3\,d\,{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right ) \operatorname {sech}^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________